/**
 * @file WarGamesServerMain.java
 * @author ApertureScience
 */

package aperturescience.wargames;
import org.restlet.Component;
import org.restlet.data.Protocol;

/**
 * Produces a component containing the WarGamesApplication for a Tomcat server to provide at the specified URL.
 */
public class WarGamesServerMain {
	/**
	 * Runs a component on executing Tomcat server.
	 *
	 * @param args	Command line parameters (unused).
	 */
	public static void main(String[] args)
	throws Exception {
		Component component = new Component();
		// Add a new HTTP server listening on port 8111.
		component.getServers().add(Protocol.HTTP, 8111);
		component.getClients().add(Protocol.HTTP);
		component.getDefaultHost().attach("/ApertureScience", new WarGamesApplication());
		// Start the component.
		component.start();
	}
}